import 'package:flutter/material.dart';

/// 一个封装了屏幕宽高的基类 StatelessWidget
abstract class BaseStatelessWidget extends StatelessWidget {
  const BaseStatelessWidget({super.key});

  /// 获取屏幕宽度
  double screenWidth(BuildContext context) =>
      MediaQuery.of(context).size.width;

  /// 获取屏幕高度
  double screenHeight(BuildContext context) =>
      MediaQuery.of(context).size.height;

  @override
  Widget build(BuildContext context);
}
